package com.founder.chd_daily_query.entity.query;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "WATER_COAL_SENDPLAN", schema = "RBD_RESULT", catalog = "")
public class WaterCoalSendplanEntity {
    private String purchaseSalePlanId;
    private String demandPlanId;
    private String demandSupplierId;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date demandPlanDate;
    private Long planPurchaseQuantity;

    private String supplierUnitId;
    private String planAttributeType;
    private String coalCategoryId;
    private String qnet;
    private String std;
    private Long onboardPrice;
    private Long naturalCoalUnitprice;
    private Long standardCoalUnitprice;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date lastUpdateDate;
    private String supplyProvinceId;
    private String powerstationId;

    @Id
    @Column(name = "PURCHASE_SALE_PLAN_ID")
    public String getPurchaseSalePlanId() {
        return purchaseSalePlanId;
    }

    public void setPurchaseSalePlanId(String purchaseSalePlanId) {
        this.purchaseSalePlanId = purchaseSalePlanId;
    }

    @Basic
    @Column(name = "DEMAND_PLAN_ID")
    public String getDemandPlanId() {
        return demandPlanId;
    }

    public void setDemandPlanId(String demandPlanId) {
        this.demandPlanId = demandPlanId;
    }

    @Basic
    @Column(name = "DEMAND_SUPPLIER_ID")
    public String getDemandSupplierId() {
        return demandSupplierId;
    }

    public void setDemandSupplierId(String demandSupplierId) {
        this.demandSupplierId = demandSupplierId;
    }

    @Basic
    @Column(name = "DEMAND_PLAN_DATE")
    public Date getDemandPlanDate() {
        return demandPlanDate;
    }

    public void setDemandPlanDate(Date demandPlanDate) {
        this.demandPlanDate = demandPlanDate;
    }

    @Basic
    @Column(name = "PLAN_PURCHASE_QUANTITY")
    public Long getPlanPurchaseQuantity() {
        return planPurchaseQuantity;
    }

    public void setPlanPurchaseQuantity(Long planPurchaseQuantity) {
        this.planPurchaseQuantity = planPurchaseQuantity;
    }

    @Basic
    @Column(name = "SUPPLIER_UNIT_ID")
    public String getSupplierUnitId() {
        return supplierUnitId;
    }

    public void setSupplierUnitId(String supplierUnitId) {
        this.supplierUnitId = supplierUnitId;
    }

    @Basic
    @Column(name = "PLAN_ATTRIBUTE_TYPE")
    public String getPlanAttributeType() {
        return planAttributeType;
    }

    public void setPlanAttributeType(String planAttributeType) {
        this.planAttributeType = planAttributeType;
    }

    @Basic
    @Column(name = "COAL_CATEGORY_ID")
    public String getCoalCategoryId() {
        return coalCategoryId;
    }

    public void setCoalCategoryId(String coalCategoryId) {
        this.coalCategoryId = coalCategoryId;
    }

    @Basic
    @Column(name = "QNET")
    public String getQnet() {
        return qnet;
    }

    public void setQnet(String qnet) {
        this.qnet = qnet;
    }

    @Basic
    @Column(name = "STD")
    public String getStd() {
        return std;
    }

    public void setStd(String std) {
        this.std = std;
    }

    @Basic
    @Column(name = "ONBOARD_PRICE")
    public Long getOnboardPrice() {
        return onboardPrice;
    }

    public void setOnboardPrice(Long onboardPrice) {
        this.onboardPrice = onboardPrice;
    }

    @Basic
    @Column(name = "NATURAL_COAL_UNITPRICE")
    public Long getNaturalCoalUnitprice() {
        return naturalCoalUnitprice;
    }

    public void setNaturalCoalUnitprice(Long naturalCoalUnitprice) {
        this.naturalCoalUnitprice = naturalCoalUnitprice;
    }

    @Basic
    @Column(name = "STANDARD_COAL_UNITPRICE")
    public Long getStandardCoalUnitprice() {
        return standardCoalUnitprice;
    }

    public void setStandardCoalUnitprice(Long standardCoalUnitprice) {
        this.standardCoalUnitprice = standardCoalUnitprice;
    }

    @Basic
    @Column(name = "CREATE_DATE")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "LAST_UPDATE_DATE")
    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    @Basic
    @Column(name = "SUPPLY_PROVINCE_ID")
    public String getSupplyProvinceId() {
        return supplyProvinceId;
    }

    public void setSupplyProvinceId(String supplyProvinceId) {
        this.supplyProvinceId = supplyProvinceId;
    }

    @Basic
    @Column(name = "POWERSTATION_ID")
    public String getPowerstationId() {
        return powerstationId;
    }

    public void setPowerstationId(String powerstationId) {
        this.powerstationId = powerstationId;
    }

    @Override
    public String toString() {
        return "WaterCoalSendplanEntity{" +
                "purchaseSalePlanId='" + purchaseSalePlanId + '\'' +
                ", demandPlanId='" + demandPlanId + '\'' +
                ", demandSupplierId='" + demandSupplierId + '\'' +
                ", demandPlanDate=" + demandPlanDate +
                ", planPurchaseQuantity=" + planPurchaseQuantity +
                ", supplierUnitId='" + supplierUnitId + '\'' +
                ", planAttributeType='" + planAttributeType + '\'' +
                ", coalCategoryId='" + coalCategoryId + '\'' +
                ", qnet='" + qnet + '\'' +
                ", std='" + std + '\'' +
                ", onboardPrice=" + onboardPrice +
                ", naturalCoalUnitprice=" + naturalCoalUnitprice +
                ", standardCoalUnitprice=" + standardCoalUnitprice +
                ", createDate=" + createDate +
                ", lastUpdateDate=" + lastUpdateDate +
                ", supplyProvinceId='" + supplyProvinceId + '\'' +
                ", powerstationId='" + powerstationId + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WaterCoalSendplanEntity that = (WaterCoalSendplanEntity) o;
        return Objects.equals(purchaseSalePlanId, that.purchaseSalePlanId) &&
                Objects.equals(demandPlanId, that.demandPlanId) &&
                Objects.equals(demandSupplierId, that.demandSupplierId) &&
                Objects.equals(demandPlanDate, that.demandPlanDate) &&
                Objects.equals(planPurchaseQuantity, that.planPurchaseQuantity) &&
                Objects.equals(supplierUnitId, that.supplierUnitId) &&
                Objects.equals(planAttributeType, that.planAttributeType) &&
                Objects.equals(coalCategoryId, that.coalCategoryId) &&
                Objects.equals(qnet, that.qnet) &&
                Objects.equals(std, that.std) &&
                Objects.equals(onboardPrice, that.onboardPrice) &&
                Objects.equals(naturalCoalUnitprice, that.naturalCoalUnitprice) &&
                Objects.equals(standardCoalUnitprice, that.standardCoalUnitprice) &&
                Objects.equals(createDate, that.createDate) &&
                Objects.equals(lastUpdateDate, that.lastUpdateDate) &&
                Objects.equals(supplyProvinceId, that.supplyProvinceId) &&
                Objects.equals(powerstationId, that.powerstationId);
    }

    @Override
    public int hashCode() {

        return Objects.hash(purchaseSalePlanId, demandPlanId, demandSupplierId, demandPlanDate, planPurchaseQuantity, supplierUnitId, planAttributeType, coalCategoryId, qnet, std, onboardPrice, naturalCoalUnitprice, standardCoalUnitprice, createDate, lastUpdateDate, supplyProvinceId, powerstationId);
    }
}
